
 <!DOCTYPE HTML>
<html lang="chinese">
<head>
  <meta charset="UTF-8">

  <title>qiniu | liyang&#39;s blog</title>

    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=3, minimum-scale=1">
    
    <meta name="author" content="Screenshot 2015">
    
    <meta name="description" itemprop="description" content="七牛云存储js">
    
    
    
    <meta name="twitter:card" content="summary" />
    <meta name="twitter:site" content="564845354" />
    <meta name="twitter:title" content="qiniu | liyang&#39;s blog" />
      
        <meta name="twitter:description" content="七牛云存储js" />
      
    
    
    <link rel="alternate" href="/atom.xml" title="liyang&#39;s blog" type="application/atom+xml">
    
    
    <link rel="icon" href="/img/favicon.ico">
    
    
    <link rel="apple-touch-icon" href="/http://7viklp.com1.z0.glb.clouddn.com/yilan/img/blog/pacman.jpg">
    <link rel="apple-touch-icon-precomposed" href="/http://7viklp.com1.z0.glb.clouddn.com/yilan/img/blog/pacman.jpg">
    
    <link rel="stylesheet" href="/css/style.css">
</head>

  <body>
    <header>
      <div>
		
			<div id="imglogo">
				<a href="/"><img src="/img/logo.svg" alt="liyang&#39;s blog" title="liyang&#39;s blog"/></a>
			</div>
			
			<div id="textlogo">
				<h1 class="site-name"><a href="/" title="liyang&#39;s blog">liyang&#39;s blog</a></h1>
				<h2 class="blog-motto">Stay hungry,stay foolish.</h2>
			</div>
			<div class="navbar"><a class="navbutton navmobile" href="#" title="Menu">
			</a></div>
			<nav class="animated">
				<ul>
					
						<li><a href="/">Home</a></li>
					
						<li><a href="/archives">Archives</a></li>
					
						<li><a href="/about">About</a></li>
					
					<li>
					
											<form class="search" action="/search/index.html" method="get" accept-charset="utf-8">
											<label>Search</label>
											<input type="text" class="st-default-search-input" maxlength="20" placeholder="Search" />
											</form>
					
					</li>
				</ul>
			</nav>			
			<script type="text/javascript">
			  (function(w,d,t,u,n,s,e){w['SwiftypeObject']=n;w[n]=w[n]||function(){
			  (w[n].q=w[n].q||[]).push(arguments);};s=d.createElement(t);
			  e=d.getElementsByTagName(t)[0];s.async=1;s.src=u;e.parentNode.insertBefore(s,e);
			  })(window,document,'script','//s.swiftypecdn.com/install/v2/st.js','_st');

			  _st('install','ThbyuUMiwzLDsmVUEvye','2.0.0');
			</script>
</div>

    </header>
    <div id="container">
      <div id="main" class="post" itemscope itemprop="blogPost">
	<article itemprop="articleBody"> 
		<header class="article-info clearfix">
  <h1 itemprop="name">
    
      <a href="/2015/12/24/qiniu/" title="qiniu" itemprop="url">qiniu</a>
  </h1>
  <p class="article-author">By
    
      <a href="http://buildlove.github.io" title="Screenshot 2015">Screenshot 2015</a>
    </p>
  <p class="article-time">
    <time datetime="2015-12-24T08:37:01.000Z" itemprop="datePublished">2015-12-24</time>
    Updated:<time datetime="2016-10-13T09:22:23.000Z" itemprop="dateModified">2016-10-13</time>
    
  </p>
</header>
	<div class="article-content">
		
		
		<div id="toc" class="toc-article">
			<strong class="toc-title">Contents</strong>
		<ol class="toc"><li class="toc-item toc-level-4"><a class="toc-link" href="#同步"><span class="toc-number">1.</span> <span class="toc-text">同步</span></a></li></ol>
		</div>
		
		<p>前期使用了qshell命令行工具进行上传<br><a href="https://github.com/qiniu/qshell" target="_blank" rel="external">https://github.com/qiniu/qshell</a></p>
<h4 id="同步"><a href="#同步" class="headerlink" title="同步"></a>同步</h4><p>以下是文件windows下七牛的配置文件qn.conf<br>{<br>    “src_dir”   :   “C:\Users\用户名\Desktop\文件夹”,   //这个是需要同步文件夹的地址<br>    “access_key”    :   “”,           //在这个地址获得<a href="https://portal.qiniu.com/setting/key" target="_blank" rel="external">https://portal.qiniu.com/setting/key</a><br>    “secret_key”    :   “”,           //在这个地址获得<a href="https://portal.qiniu.com/setting/key" target="_blank" rel="external">https://portal.qiniu.com/setting/key</a><br>    “up_host”       :   “<a href="http://up.qiniu.com" target="_blank" rel="external">http://up.qiniu.com</a>“,               //上传的地址<br>    “bucket”    :   “liyang”,                                //空间名<br>    “key_prefix”    :   “yilan/img/“,                        //上传之后文件前缀<br>    “ignore_dir”    :   false,<br>    “overwrite”     :   false,<br>    “check_exists”  :   false<br>}<br>qshell qupload qn.conf  同步上传本地所有文件</p>
  
	</div>
		<footer class="article-footer clearfix">

  <div class="article-tags">
  
  <span></span> <a href="/tags/图床/">图床</a>
  </div>


<div class="article-categories">
  <span></span>
  <a class="article-category-link" href="/categories/七牛/">七牛</a>
</div>



<div class="article-share" id="share">

  <div data-url="http://buildlove.github.io/2015/12/24/qiniu/" data-title="qiniu | liyang&#39;s blog" data-tsina="null" class="share clearfix">
  </div>

</div>
</footer>   	       
	</article>
	
<nav class="article-nav clearfix">
 
 <div class="prev" >
 <a href="/2016/01/07/javascript/" title="javascript">
  <strong>上一篇:</strong><br/>
  <span>
  javascript</span>
</a>
</div>


<div class="next">
<a href="/2015/12/21/ubuntu/"  title="ubuntu14.10遇到的问题">
 <strong>下一篇:</strong><br/> 
 <span>ubuntu14.10遇到的问题
</span>
</a>
</div>

</nav>

	
<section class="comment">
	<div class="ds-thread"></div>
</section>

</div>  
      <div class="openaside"><a class="navbutton" href="#" title="Show Sidebar"></a></div>

  <div id="toc" class="toc-aside">
  <strong class="toc-title">Contents</strong>
  <ol class="toc"><li class="toc-item toc-level-4"><a class="toc-link" href="#同步"><span class="toc-number">1.</span> <span class="toc-text">同步</span></a></li></ol>
  </div>

<div id="asidepart">
<div class="closeaside"><a class="closebutton" href="#" title="Hide Sidebar"></a></div>
<aside class="clearfix">

  
<div class="categorieslist">
	<p class="asidetitle">Categories</p>
		<ul>
		
			<li><a href="/categories/database/" title="database">database<sup>1</sup></a></li>
		
			<li><a href="/categories/git-difftool-Beyond-Compare/" title="git difftool(Beyond Compare)">git difftool(Beyond Compare)<sup>1</sup></a></li>
		
			<li><a href="/categories/hexo学习配置/" title="hexo学习配置">hexo学习配置<sup>1</sup></a></li>
		
			<li><a href="/categories/javascript/" title="javascript">javascript<sup>1</sup></a></li>
		
			<li><a href="/categories/linux/" title="linux">linux<sup>1</sup></a></li>
		
			<li><a href="/categories/node-npm命令行参数和插件/" title="node&amp;npm命令行参数和插件">node&amp;npm命令行参数和插件<sup>1</sup></a></li>
		
			<li><a href="/categories/python/" title="python">python<sup>1</sup></a></li>
		
			<li><a href="/categories/七牛/" title="七牛">七牛<sup>1</sup></a></li>
		
			<li><a href="/categories/分布式版本管理工具/" title="分布式版本管理工具">分布式版本管理工具<sup>1</sup></a></li>
		
			<li><a href="/categories/数据库/" title="数据库">数据库<sup>1</sup></a></li>
		
			<li><a href="/categories/绘图/" title="绘图">绘图<sup>1</sup></a></li>
		
		</ul>
</div>


  
<div class="tagslist">
	<p class="asidetitle">Tags</p>
		<ul class="clearfix">
		
			<li><a href="/tags/database/" title="database">database<sup>2</sup></a></li>
		
			<li><a href="/tags/git/" title="git">git<sup>1</sup></a></li>
		
			<li><a href="/tags/hexo/" title="hexo">hexo<sup>1</sup></a></li>
		
			<li><a href="/tags/js/" title="js">js<sup>1</sup></a></li>
		
			<li><a href="/tags/linux/" title="linux">linux<sup>1</sup></a></li>
		
			<li><a href="/tags/mac/" title="mac">mac<sup>1</sup></a></li>
		
			<li><a href="/tags/mysql/" title="mysql">mysql<sup>1</sup></a></li>
		
			<li><a href="/tags/node/" title="node">node<sup>1</sup></a></li>
		
			<li><a href="/tags/npm/" title="npm">npm<sup>1</sup></a></li>
		
			<li><a href="/tags/photo/" title="photo">photo<sup>1</sup></a></li>
		
			<li><a href="/tags/ps/" title="ps">ps<sup>1</sup></a></li>
		
			<li><a href="/tags/python/" title="python">python<sup>2</sup></a></li>
		
			<li><a href="/tags/ubuntu/" title="ubuntu">ubuntu<sup>1</sup></a></li>
		
			<li><a href="/tags/分布式版本管理工具/" title="分布式版本管理工具">分布式版本管理工具<sup>1</sup></a></li>
		
			<li><a href="/tags/图床/" title="图床">图床<sup>1</sup></a></li>
		
		</ul>
</div>


  <div class="rsspart">
	<a href="/atom.xml" target="_blank" title="rss">RSS</a>
</div>

</aside>
</div>
    </div>
    <footer><div id="footer" >
	
	<div class="line">
		<span></span>
		<div class="author"></div>
	</div>
	
	
	<section class="info">
		<p> Hello ,I&#39;m Liyang Page in Honglian. <br/>
			This is my blog,believe it or not.</p>
	</section>
	 
	<div class="social-font clearfix">
		
		<a href="http://weibo.com/1954002307" target="_blank" title="weibo"></a>
		
		
		<a href="https://twitter.com/564845354" target="_blank" title="twitter"></a>
		
		
		<a href="https://github.com/buildlove" target="_blank" title="github"></a>
		
		
		<a href="https://www.facebook.com/profile.php?id=100008166199067" target="_blank" title="facebook"></a>
		
		
	</div>
		<p class="copyright">Powered by <a href="http://hexo.io" target="_blank" title="hexo">hexo</a> and Theme by <a href="https://github.com/A-limon/pacman" target="_blank" title="Pacman">Pacman</a> © 2017 
		
		<a href="http://buildlove.github.io" target="_blank" title="Screenshot 2015">Screenshot 2015</a>
		
		</p>
</div>
</footer>
    <script src="/js/jquery-2.1.0.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){ 
  $('.navbar').click(function(){
    $('header nav').toggleClass('shownav');
  });
  var myWidth = 0;
  function getSize(){
    if( typeof( window.innerWidth ) == 'number' ) {
      myWidth = window.innerWidth;
    } else if( document.documentElement && document.documentElement.clientWidth) {
      myWidth = document.documentElement.clientWidth;
    };
  };
  var m = $('#main'),
      a = $('#asidepart'),
      c = $('.closeaside'),
      o = $('.openaside');
  $(window).resize(function(){
    getSize(); 
    if (myWidth >= 1024) {
      $('header nav').removeClass('shownav');
    }else
    {
      m.removeClass('moveMain');
      a.css('display', 'block').removeClass('fadeOut');
      o.css('display', 'none');
      
      $('#toc.toc-aside').css('display', 'none');
        
    }
  });
  c.click(function(){
    a.addClass('fadeOut').css('display', 'none');
    o.css('display', 'block').addClass('fadeIn');
    m.addClass('moveMain');
  });
  o.click(function(){
    o.css('display', 'none').removeClass('beforeFadeIn');
    a.css('display', 'block').removeClass('fadeOut').addClass('fadeIn');      
    m.removeClass('moveMain');
  });
  $(window).scroll(function(){
    o.css("top",Math.max(80,260-$(this).scrollTop()));
  });
});
</script>

<script type="text/javascript">
$(document).ready(function(){ 
  var ai = $('.article-content>iframe'),
      ae = $('.article-content>embed'),
      t  = $('#toc'),
      h  = $('article h2')
      ah = $('article h2'),
      ta = $('#toc.toc-aside'),
      o  = $('.openaside'),
      c  = $('.closeaside');
  if(ai.length>0){
    ai.wrap('<div class="video-container" />');
  };
  if(ae.length>0){
   ae.wrap('<div class="video-container" />');
  };
  if(ah.length==0){
    t.css('display','none');
  }else{
    c.click(function(){
      ta.css('display', 'block').addClass('fadeIn');
    });
    o.click(function(){
      ta.css('display', 'none');
    });
    $(window).scroll(function(){
      ta.css("top",Math.max(140,320-$(this).scrollTop()));
    });
  };
});
</script>


<script type="text/javascript">
$(document).ready(function(){ 
  var $this = $('.share'),
      url = $this.attr('data-url'),
      encodedUrl = encodeURIComponent(url),
      title = $this.attr('data-title'),
      tsina = $this.attr('data-tsina');
  var html = [
  '<a href="#" class="overlay" id="qrcode"></a>',
  '<div class="qrcode clearfix"><span>扫描二维码分享到微信朋友圈</span><a class="qrclose" href="#share"></a><strong>Loading...Please wait</strong><img id="qrcode-pic" data-src="http://s.jiathis.com/qrcode.php?url=' + encodedUrl + '"/></div>',
  '<a href="#textlogo" class="article-back-to-top" title="Top"></a>',
  '<a href="https://www.facebook.com/sharer.php?u=' + encodedUrl + '" class="article-share-facebook" target="_blank" title="Facebook"></a>',
  '<a href="#qrcode" class="article-share-qrcode" title="QRcode"></a>',
  '<a href="https://twitter.com/intent/tweet?url=' + encodedUrl + '" class="article-share-twitter" target="_blank" title="Twitter"></a>',
  '<a href="http://service.weibo.com/share/share.php?title='+title+'&url='+encodedUrl +'&ralateUid='+ tsina +'&searchPic=true&style=number' +'" class="article-share-weibo" target="_blank" title="Weibo"></a>',
  '<span title="Share to"></span>'
  ].join('');
  $this.append(html);
  $('.article-share-qrcode').click(function(){
    var imgSrc = $('#qrcode-pic').attr('data-src');
    $('#qrcode-pic').attr('src', imgSrc);
    $('#qrcode-pic').load(function(){
        $('.qrcode strong').text(' ');
    });
  });
});     
</script>


<script type="text/javascript">
  var duoshuoQuery = {short_name:"buildlove"};
  (function() {
    var ds = document.createElement('script');
    ds.type = 'text/javascript';ds.async = true;
    ds.src = '//static.duoshuo.com/embed.js';
    ds.charset = 'UTF-8';
    (document.getElementsByTagName('head')[0] 
    || document.getElementsByTagName('body')[0]).appendChild(ds);
  })();
</script> 



<link rel="stylesheet" href="/fancybox/jquery.fancybox.css" media="screen" type="text/css">
<script src="/fancybox/jquery.fancybox.pack.js"></script>
<script type="text/javascript">
$(document).ready(function(){ 
  $('.article-content').each(function(i){
    $(this).find('img').each(function(){
      if ($(this).parent().hasClass('fancybox')) return;
      var alt = this.alt;
      if (alt) $(this).after('<span class="caption">' + alt + '</span>');
      $(this).wrap('<a href="' + this.src + '" title="' + alt + '" class="fancybox"></a>');
    });
    $(this).find('.fancybox').each(function(){
      $(this).attr('rel', 'article' + i);
    });
  });
  if($.fancybox){
    $('.fancybox').fancybox();
  }
}); 
</script>



  </body>
</html>
